import kafka from "node-rdkafka";
import { conf } from "../confParse.js";

function createReqStream(conf:conf):kafka.ConsumerStream{
    return kafka.createReadStream({
        "group.id": "nodeProcess",
        "metadata.broker.list": conf.brokerList,
    }, {
        "auto.commit.enable": true
    }, {
        'topics': [conf.reqTopic]
    })
}

export {createReqStream}